Recommendation Method Based on Exercise Status of User and Electronic Device

ABSTRACT

A recommendation method based on an exercise status of a user includes an electronic device obtaining first exercise data of a user after running an exercise application. The first exercise data is used to reflect a type of exercise that is being performed by the user. The method further includes the electronic device determining a first exercise scenario corresponding to the first exercise data. The method further includes the electronic device obtaining first recommended content corresponding to the first exercise scenario. The method further includes the electronic device displaying the first recommended content in a display interface of the exercise application, or the electronic device playing the first recommended content when running the exercise application.

This application claims priority to Chinese Patent Application No.201910062730.7, filed with the China National Intellectual PropertyAdministration on Jan. 23, 2019 and entitled “RECOMMENDATION METHODBASED ON EXERCISE STATUS OF USER AND ELECTRONIC DEVICE”, which isincorporated herein by reference in its entirety.

TECHNICAL FIELD

This application relates to the field of terminal technologies, and inparticular, to a recommendation method based on an exercise status of auser and an electronic device.

BACKGROUND

Currently, many users install exercise applications (application, APP),for example, Codoon or Huawei Health, on terminals such as mobilephones. During exercise, a user may use the foregoing exercise app tocollect and view exercise information of the user, such as an exercisestep count, an exercise speed, exercise duration, and an exercisedistance.

In addition to viewing the foregoing exercise information in theexercise app, the user during exercise can also use functions providedby other applications to enhance exercise experience. For example, whenrunning, the user may listen to a song by using a music app, or view aweather condition by using a weather app. It can be learned thatfunctions that need to be provided by the mobile phone for the userduring exercise are generally distributed in different displayinterfaces of different applications. Therefore, the user needs tomanually perform searching and switching in each display interfaceduring exercise. This easily causes interference to an exercise process,and reduces user experience.

SUMMARY

This application provides a recommendation method based on an exercisestatus of a user and an electronic device, so that exercise-relatedservice content can be provided for a user when an exercise app is run,to reduce a quantity of times that the user switches between displayinterfaces, and improve exercise experience of the user.

To achieve the foregoing objectives, the following technical solutionsare used in this application.

According to a first aspect, this application provides a recommendationmethod based on an exercise status of a user, including: An electronicdevice obtains first exercise data of the user after running an exerciseapplication, where the first exercise data is used to reflect a type ofexercise that is being performed by the user; the electronic device maydetermine a first exercise scenario corresponding to the first exercisedata; the electronic device may obtain first recommended contentcorresponding to the first exercise scenario; and when running theexercise application, the electronic device may display the firstrecommended content in a display interface of the exercise application,or the electronic device may play the first recommended content througha voice. In this way, in a process of completing exercise by using theexercise app, the user may directly enjoy, in the exercise app,recommended content that is related to the current exercise and that isprovided by another application or service. The user does not need torepeatedly switch between different apps or different display interfacesto search for content required by the user during the exercise process.This improves exercise experience of the user when using the exerciseapp.

In a possible design method, that the electronic device determines afirst exercise scenario corresponding to the first exercise dataspecifically includes: The electronic device determines the exercisetype corresponding to the first exercise data, and determines theexercise type as the first exercise scenario. In other words, the typeof exercise that is being performed by the user is the first exercisescenario.

Alternatively, before that the electronic device determines a firstexercise scenario corresponding to the first exercise data, the methodfurther includes: The electronic device obtains current firstenvironment data, where the first environment data is used to reflect anenvironment feature during exercise of the user; and that the electronicdevice determines a first exercise scenario corresponding to the firstexercise data specifically includes: The electronic device determinesthe first exercise scenario corresponding to the first exercise data andthe first environment data. In other words, the electronic device maydetermine the corresponding first exercise scenario based on the currentexercise type of the user and an environment factor. When the userperforms different exercises in different scenarios, the electronicdevice may determine a corresponding exercise scenario by obtainingcorresponding exercise data and environment data.

In a possible design method, the electronic device may store acorrespondence between different exercise scenarios and differentrecommended content, and that the electronic device obtains firstrecommended content corresponding to the first exercise scenariospecifically includes: The electronic device queries the firstrecommended content corresponding to the first exercise scenario in thecorrespondence. In this way, in different exercise scenarios, theelectronic device may determine, for the user, recommended content thatis related to the current exercise scenario, and recommend therecommended content to the user.

In a possible design method, the first recommended content is determinedby the electronic device based on a historical use habit of the user inthe first exercise scenario. In this case, in a same exercise scenario,recommended content determined by the electronic device for differentusers is related to historical behavior habits of the users, so thatpersonalized and customized recommended content is provided for theusers during exercise.

in a possible design method, that the electronic device displays thefirst recommended content in a display interface of the exerciseapplication includes: The electronic device displays detailedinformation of the first recommended content in the display interface ofthe exercise application, in other words, the electronic device providesa recommendation function of direct service in the exercise application,to reduce a quantity of times of jumping and switching between differentinterfaces when the user is in exercise; or the electronic devicedisplays a shortcut of the first recommended content in the displayinterface of the exercise application. The user may trigger, through theshortcut of the first recommended content, the electronic device to playor display the specific first recommended content.

For example, after that the electronic device displays a shortcut of thefirst recommended content in the display interface of the exerciseapplication, the method may further include: If detecting that the userselects the shortcut of the first recommended content, the electronicdevice displays or plays the detailed information of the firstrecommended content in the display interface of the exerciseapplication.

In a possible design method, that the electronic device plays the firstrecommended content when running the exercise application specificallyincludes: When running the exercise application, if receiving a presetgesture entered by the user, the electronic device may start to play thefirst recommended content. In other words, the electronic device may bepreset to trigger, in a trigger manner, for example, tapping the device,shaking the device, or lifting a hand, the electronic device to play therecommended content.

In a possible design method, before that the electronic device displaysthe first recommended content in a display interface of the exerciseapplication, or before that the electronic device plays the firstrecommended content when running the exercise application, the methodmay further include: The electronic device may choose, based on thefirst exercise scenario, to display the first recommended content orplay the first recommended content. In this way, the electronic devicemay select, based on features of different exercise scenarios, anappropriate manner to recommend the recommended content determined bythe electronic device to the user, to improve exercise experience of theuser.

In a possible design method, the method further includes: The electronicdevice may obtain second exercise data of the user when running theexercise application, and determine a second exercise scenariocorresponding to the second exercise data (the second exercise scenariois different from the first exercise scenario); and the electronicdevice may obtain second recommended content corresponding to the secondexercise scenario, and display the second recommended content in thedisplay interface of the exercise application, or play the secondrecommended content when running the exercise application (the secondrecommended content is different from the first recommended content). Inother words, all recommended content recommended by the electronicdevice to the user when running the exercise app is related to thecurrent exercise scenario of the user. When the user performs differentexercises, the electronic device may recommend, to the user, differentrecommended content related to the exercise scenario.

For example, the first recommended content or the second recommendedcontent may include one or more of an audio file, a video file, fitnessand health information, or environment information.

According to a second aspect, this application provides an electronicdevice, including one or more sensors, one or more processors, one ormore memories, and one or more computer programs. The processor iscoupled to the sensor, a touchscreen, and the memory. The one or morecomputer programs are stored in the memory. When the electronic deviceruns, the processor executes the one or more computer programs stored inthe memory, so that the electronic device performs any one of theforegoing recommendation methods based on the exercise status of theuser.

According to a third aspect, this application provides a graphical userinterface (graphical user interface, GUI). The graphical user interfaceis stored in the foregoing electronic device, the electronic deviceincludes a touchscreen, a memory, and a processor. The processor isconfigured to execute one or more computer programs stored in thememory. The graphical user interface may include: a first GUI displayedon the touchscreen when the electronic device is in a first exercisescenario, where the first GUI is a first display interface of anexercise application, and the first display interface includes firstrecommended content corresponding to the first exercise scenario; and asecond GUI displayed on the touchscreen when the electronic device is ina second exercise scenario, where the second GUI is a second displayinterface of an exercise application, and the second display interfaceincludes second recommended content corresponding to the second exercisescenario, where the second exercise scenario is different from the firstexercise scenario, and the second recommended content is different fromthe first recommended content.

For example, the first recommended content in the first GUI isdetermined by the electronic device based on a historical use habit of auser in the first exercise scenario; and/or the second recommendedcontent in the second GUI is determined by the electronic device basedon a historical use habit of the user in the second exercise scenario.

According to a fourth aspect, this application provides a computerstorage medium, including computer instructions. When the computerinstructions are run on an electronic device, the electronic device isenabled to perform the recommendation method based on an exercise statusof a user in any one of the possible design methods of the first aspect.

According to a fifth aspect, this application provides a computerprogram product. When the computer program product runs on an electronicdevice, the electronic device is enabled to perform the recommendationmethod based on an exercise status of a user in any one of the possibledesign methods of the first aspect.

It may be understood that the electronic device according to the secondaspect, the GUI according to the third aspect, the computer storagemedium according to the fourth aspect, and the computer program productaccording to the fifth aspect that are provided above are all configuredto perform the corresponding method provided above. Therefore, forbeneficial effects that can be achieved, refer to the beneficial effectsin the corresponding method provided above. Details are not describedherein again.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic structural diagram 1 of an electronic deviceaccording to an embodiment of this application;

FIG. 2 is a schematic architectural diagram of an operating system on anelectronic device according to an embodiment of this application;

FIG. 3 is a schematic diagram 1 of a scenario of a recommendation methodbased on an exercise status of a user according to an embodiment of thisapplication;

FIG. 4 is a schematic flowchart of a recommendation method based on anexercise status of a user according to an embodiment of thisapplication;

FIG. 5 is a schematic diagram 2 of a scenario of a recommendation methodbased on an exercise status of a user according to an embodiment of thisapplication;

FIG. 6 is a schematic interaction diagram 1 of a recommendation methodbased on an exercise status of a user according to an embodiment of thisapplication;

FIG. 7 is a schematic diagram 3 of a scenario of a recommendation methodbased on an exercise status of a user according to an embodiment of thisapplication;

FIG. 8 is a schematic diagram 4 of a scenario of a recommendation methodbased on an exercise status of a user according to an embodiment of thisapplication;

FIG. 9 is a schematic diagram 5 of a scenario of a recommendation methodbased on an exercise status of a user according to an embodiment of thisapplication;

FIG. 10 is a schematic diagram 6 of a scenario of a recommendationmethod based on an exercise status of a user according to an embodimentof this application;

FIG. 11 is a schematic diagram 7 of a scenario of a recommendationmethod based on an exercise status of a user according to an embodimentof this application;

FIG. 12 is a schematic diagram 8 of a scenario of a recommendationmethod based on an exercise status of a user according to an embodimentof this application;

FIG. 13 is a schematic diagram 9 of a scenario of a recommendationmethod based on an exercise status of a user according to an embodimentof this application;

FIG. 14 is a schematic diagram 10 of a scenario of a recommendationmethod based on an exercise status of a user according to an embodimentof this application;

FIG. 15 is a schematic interaction diagram 2 of a recommendation methodbased on an exercise status of a user according to an embodiment of thisapplication; and

FIG. 16 is a schematic structural diagram 2 of an electronic deviceaccording to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

The following describes implementations of the embodiments in detailwith reference to the accompanying drawings.

An embodiment of this application provides a recommendation method basedon an exercise status of a user. The method may be applied to a mobilephone, a tablet computer, a notebook computer, an ultra-mobile personalcomputer (ultra-mobile personal computer, UMPC), a handheld computer, anetbook, a personal digital assistant (personal digital assistant, PDA),a wearable electronic device, a virtual reality device, or the like.This is not limited in the embodiments of this application.

For example, a mobile phone 100 is the foregoing electronic device. FIG.1 is a schematic structural diagram of the mobile phone.

The mobile phone 100 may include a processor 110, an external memoryinterface 120, an internal memory 121, a universal serial bus (universalserial bus, USB) interface 130, a charging management module 140, apower management module 141, a battery 142, an antenna 1, an antenna 2,a radio frequency module 150, a communications module 160, an audiomodule 170, a speaker 170A, a receiver 170B, a microphone 170C, aheadset jack 170D, a sensor module 180, a button 190, a motor 191, anindicator 192, a camera 193, a display 194, a subscriber identificationmodule (subscriber identification module, SIM) card interface 195, andthe like. The sensor module 180 may include a pressure sensor 180A, agyro sensor 180B, a barometric pressure sensor 180C, a magnetic sensor180D, an acceleration sensor 180E, a distance sensor 180F, an opticalproximity sensor 180G, a fingerprint sensor 180H, a temperature sensor180I, a touch sensor 180K, an ambient light sensor 180L, a boneconduction sensor 180M, and the like.

It may be understood that the structure shown in this embodiment of thisapplication does not constitute a specific limitation on the mobilephone 100. In some other embodiments of this application, the mobilephone 100 may include more or fewer components than those shown in FIG.1, combine some components, split some components, or have differentcomponent arrangements. The components shown in the figure may beimplemented by hardware, software, or a combination of software andhardware.

The processor 110 may include one or more processing units. For example,the processor 110 may include an application processor (applicationprocessor, AP), a modem processor, a graphics processing unit (graphicsprocessing unit, GPU), an image signal processor (image signalprocessor, ISP), a controller, a memory, a video codec, a digital signalprocessor (digital signal processor, DSP), a baseband processor, aneural-network processing unit (neural-network processing unit, NPU),and/or the like. Different processing units may be independentcomponents, or may be integrated into one or more processors.

The controller may be a nerve center and a command center of the mobilephone 100. The controller may generate an operation control signal basedon instruction operation code and a time sequence signal, to completecontrol of instruction reading and instruction execution.

A memory may be further disposed in the processor 110, and is configuredto store an instruction and data. In some embodiments, the memory in theprocessor 110 is a high-speed cache memory. The memory may store aninstruction or data just used or cyclically used by the processor 110.If the processor 110 needs to use the instruction or the data again, theprocessor 110 may directly invoke the instruction or the data from thememory. This avoids repeated access, reduces a waiting time period ofthe processor 110, and improves system efficiency.

In some embodiments, the processor 110 may include one or moreinterfaces. The interface may include an inter-integrated circuit(inter-integrated circuit, I2C) interface, an inter-integrated circuitsound (inter-integrated circuit sound, I2S) interface, a pulse codemodulation (pulse code modulation, PCM) interface, a universalasynchronous receiver/transmitter (universal asynchronousreceiver/transmitter, UART) interface, a mobile industry processorinterface (mobile industry processor interface, MIPI), a general-purposeinput/output (general-purpose input/output, GPIO) interface, asubscriber identity module (subscriber identity module, SIM) interface,a universal serial bus (universal serial bus, USB) interface, and/or thelike.

The I2C interface is a two-way synchronization serial bus, and includesa serial data line (serial data line, SDA) and a serial clock line(derail clock line, SCL). In some embodiments, the processor 110 mayinclude a plurality of groups of I2C buses. The processor 110 may beseparately coupled to the touch sensor 180K, a charger, a flash, thecamera 193, and the like through different I2C bus interfaces. Forexample, the processor 110 may be coupled to the touch sensor 180Kthrough the I2C interface, so that the processor 110 communicates withthe touch sensor 180K through the I2C bus interface, to implement atouch function of the mobile phone 100.

The I2S interface may be configured to perform audio communication. Insome embodiments, the processor 110 may include a plurality of groups ofI2S buses. The processor 110 may be coupled to the audio module 170through the I2S bus, to implement communication between the processor110 and the audio module 170. In some embodiments, the audio module 170may transmit an audio signal to the communications module 160 throughthe I2S interface, to implement a function of answering a call by usinga Bluetooth headset.

The PCM interface may also be configured to: perform audiocommunication, and sample, quantize, and code an analog signal. In someembodiments, the audio module 170 may be coupled to the communicationsmodule 160 through a PCM bus interface. In some embodiments, the audiomodule 170 may also transmit an audio signal to the communicationsmodule 160 through the PCM interface, to implement a function ofanswering a call by using a Bluetooth headset. Both the I2S interfaceand the PCM interface may be configured to perform audio communication.

The UART interface is a universal serial data bus, and is configured toperform asynchronous communication. The bus may be a two-waycommunications bus, and converts to-be-transmitted data between serialcommunication and parallel communication. In some embodiments, the UARTinterface is usually configured to connect the processor 110 and thecommunications module 160. For example, the processor 110 communicateswith a Bluetooth module in the communications module 160 through theUART interface, to implement a Bluetooth function. In some embodiments,the audio module 170 may transmit an audio signal to the communicationsmodule 160 through the UART interface, to implement a function ofplaying music by using a Bluetooth headset.

The MIPI interface may be configured to connect the processor 110 to aperipheral component, for example, the display 194 or the camera 193.The MIPI interface includes a camera serial interface (camera serialinterface, CSI), a display serial interface (display serial interface,DSI), and the like. in some embodiments, the processor 110 communicateswith the camera 193 through the CSI interface, to implement aphotographing function of the mobile phone 100. The processor 110communicates with the display 194 through the DSI interface, toimplement a display function of the mobile phone 100.

The GPIO interface may be configured through software. The GPIOinterface may he configured as a control signal or a data signal. Insome embodiments, the GPIO interface may be configured to connect theprocessor 110 and the camera 193, the display 194, the communicationsmodule 160, the audio module 170, the sensor module 180, or the like.The GPIO interface may alternatively be configured as the I2C interface,the I2S interface, the UART interface, the MIPI interface, or the like.

The USB interface 130 is an interface that conforms to a USB standardspecification, and may he specifically a mini USB interface, a micro USBinterface, a USB Type-C interface, or the like. The USB interface 130may be configured to connect to a charger to charge the mobile phone100, or may be configured to transmit data between the mobile phone 100and a peripheral device, or may be configured to connect to a headset toplay audio by using the headset. The interface may alternatively beconfigured to connect to another electronic device, for example, an ARdevice.

It may be understood that an interface connection relationship betweenthe modules illustrated in the embodiments of this application is merelyan example for description, and does not constitute a limitation on astructure of the mobile phone 100. In some other embodiments of thisapplication, the mobile phone 100 may alternatively use an interfaceconnection manner different from that in the foregoing embodiments, oruse a combination of a plurality of interface connection manners.

The charging management module 140 is configured to receive charginginput from the charger. The charger may be a wireless charger or a wiredcharger. In some embodiments of wired charging, the charging managementmodule 140 may receive charging input from the wired charger through theUSB interface 130. In some embodiments of wireless charging, thecharging management module 140 may receive wireless charging input byusing a wireless charging coil of the mobile phone 100. The chargingmanagement module 140 supplies power for the electronic device by usingthe power management module 141 while charging the battery 142.

The power management module 141 is configured to connect the battery 142and the charging management module 140 to the processor 110. The powermanagement module 141 receives input of the battery 142 and/or thecharging management module 140, and supplies power to the processor 110,the internal memory 121, an external memory, the display 194, the camera193, the communications module 160, and the like. The power managementmodule 141 may be further configured to monitor parameters such as abattery capacity, a quantity of battery cycles, and a battery healthstatus (electric leakage or impedance). In some other embodiments, thepower management module 141 may alternatively be disposed in theprocessor 110. In some other embodiments, the power management module141 and the charging management module 140 may alternatively be disposedin a same device.

A wireless communication function of the mobile phone 100 may beimplemented by using the antenna 1, the antenna 2, the radio frequencymodule 150, the communications module 160, the modem processor, thebaseband processor, and the like.

The antenna 1 and the antenna 2 are configured to: transmit and receiveelectromagnetic wave signals. Each antenna in the mobile phone 100 maybe configured to cover one or more communication bands. Differentantennas may be further multiplexed to improve antenna utilization. Forexample, the antenna 1 may be multiplexed as a diversity antenna in awireless local area network. In some other embodiments, an antenna maybe used in combination with a tuning switch.

The radio frequency module 150 may provide a wireless communicationsolution that is applied to the mobile phone 100 and that includes2G/3G/4G/5G. The radio frequency module 150 may include at least onefilter, a switch, a power amplifier, a low noise amplifier (low noiseamplifier, LNA), and the like. The radio frequency module 150 mayreceive an electromagnetic wave by using the antenna 1, performprocessing such as filtering or amplification on the receivedelectromagnetic wave, and transfer the electromagnetic wave to the modemprocessor for demodulation. The radio frequency module 150 may furtheramplify a signal modulated by the modem processor, and convert thesignal into an electromagnetic wave for radiation by using theantenna 1. In some embodiments, at least some function modules in theradio frequency module 150 may be disposed in the processor 110. In someembodiments, at least some function modules in the radio frequencymodule 150 may be disposed in a same device as at least some modules inthe processor 110.

The modem processor may include a modulator and a demodulator. Themodulator is configured to modulate a to-be-sent low-frequency basebandsignal into a medium or high-frequency signal. The demodulator isconfigured to demodulate a received electromagnetic wave signal into alow-frequency baseband signal. Then, the demodulator transmits thelow-frequency baseband signal obtained through demodulation to thebaseband. processor for processing. The low-frequency baseband signal isprocessed by the baseband processor, and then transmitted to theapplication processor. The application processor outputs a sound signalthrough an audio device (which is not limited to the speaker 170A, thereceiver 170B, or the like), or displays an image or a video through thedisplay 194. In some embodiments, the modem processor may be anindependent component. In some other embodiments, the modem processormay be independent of the processor 110, and is disposed in a samecomponent as the radio frequency module 150 or another function module.

The communications module 160 may provide a wireless communicationsolution that is applied to the mobile phone 100 and that include awireless local area network (wireless local area networks, WLAN) (forexample, a wireless fidelity (wireless fidelity, Wi-Fi) network),Bluetooth (bluetooth, BT), a global navigation satellite system (globalnavigation satellite system, GNSS), frequency modulation (frequencymodulation, FM), a near field communication (near field communication,NFC) technology, or an infrared (infrared, IR) technology. Thecommunications module 160 may be one or more devices integrating atleast one communications processor module. The communications module 160receives an electromagnetic wave by using the antenna 2, performsfrequency modulation and filtering processing on an electromagnetic wavesignal, and sends a processed signal to the processor 110. Thecommunications module 160 may further receive a to-be-sent signal fromthe processor 110, perform frequency modulation and amplification on thesignal, and convert the signal into an electromagnetic wave forradiation by using the antenna 2.

In some embodiments, the antenna 1 of the mobile phone 100 is coupled tothe radio frequency module 150, and the antenna 2 is coupled to thecommunications module 160, so that the mobile phone 100 can communicatewith a network and another device by using a wireless communicationstechnology. The wireless communications technology may include a globalsystem for mobile communications (global system for mobilecommunications, GSM), a general packet radio service (general packetradio service, GPRS), code division multiple access (code divisionmultiple access, CDMA), wideband code division multiple access (widebandcode division multiple access, WCDMA), time-division code divisionmultiple access (time-division code division multiple access, TD-SCDMA),long term evolution (long term evolution, LTE), BT, a. GNSS, a WLAN,NFC, FM, an IR technology, and/or the like. The GNSS may include aglobal positioning system (global positioning system, GPS), a globalnavigation satellite system (global navigation satellite system,GLONASS), a beidou navigation satellite system (beidou navigationsatellite system, BDS), a quasi-zenith satellite system (quasi-zenithsatellite system, QZSS), and/or a satellite based augmentation system(satellite based augmentation systems, SBAS).

The mobile phone 100 implements a display function by using the GPU, thedisplay 194, the application processor, and the like. The GPU is amicroprocessor for image processing, and connects the display 194 to theapplication processor. The GPU is configured to: perform mathematicaland geometric calculation, and render an image. The processor 110 mayinclude one or more GPUs that execute a program instruction to generateor change display information.

The display 194 is configured to display an image, a video, and thelike. The display 194 includes a display panel. The display panel may bea liquid crystal display (liquid crystal display, LCD), an organiclight-emitting diode (organic light-emitting diode, OLED), anactive-matrix organic light emitting diode (active-matrix organic lightemitting diode, AMOLED), flexible light-emitting diode (flexlight-emitting diode, FLED), a mini LED, a micro LED, a micro OLED, aquantum dot light emitting diode (quantum dot light emitting diodes,QLED), or the like. In some embodiments, the mobile phone 100 mayinclude one or N displays 194, where N is a positive integer greaterthan 1.

The mobile phone 100 may implement a photographing function by using theISP, the camera 193, the video codec, the GPU, the display 194, theapplication processor, and the like.

The ISP is configured to process data fed back by the camera 193. Forexample, during photographing, a shutter is pressed, and light istransmitted to a photosensitive element of the camera through a lens. Anoptical signal is converted into an electrical signal, and thephotosensitive element of the camera transmits the electrical signal tothe ISP for processing, to convert the electrical signal into a visibleimage. The ISP may further perform algorithm optimization on noise,luminance, and complexion of the image. The ISP may further optimizeparameters such as exposure and color temperature of a photographingscenario. In some embodiments, the ISP may be disposed in the camera193.

The camera 193 is configured to capture a static image or a video. Anoptical image of an object is generated through the lens, and isprojected onto the photosensitive element. The photosensitive elementmay be a charge coupled device (charge coupled device, CCD) or acomplementary metal-oxide-semiconductor (complementarymetal-oxide-semiconductor, CMOS) phototransistor. The photosensitiveelement converts an optical signal into an electrical signal, and thentransmits the electrical signal to the ISP to convert the electricalsignal into a digital image signal. The ISP outputs the digital imagesignal to the DSP for processing. The DSP converts the digital imagesignal into a standard image signal in an ROB format, a YUV format, orthe like. In some embodiments, the mobile phone 100 may include one or Ncameras 193, where N is a positive integer greater than 1.

The digital signal processor is configured to process a digital signal,and may process another digital signal in addition to the digital imagesignal. For example, when the mobile phone 100 selects a frequency, thedigital signal processor is configured to perform Fourier transform onfrequency energy, and the like.

The video codec is configured to: compress or decompress a digitalvideo. The mobile phone 100 may support one or more video codecs. Inthis way, the mobile phone 100 can play or record videos in a pluralityof coding formats, for example, moving picture experts group (movingpicture experts group, MPEG)-1, MPEG-2, MPEG-3. and MPEG-4.

The NPU is a neural-network (neural-network, NN) computing processor,quickly processes input information by referring to a structure of abiological neural network, for example, by referring to a transfer modebetween human brain neurons, and may further continuously performself-learning. Applications such as intelligent cognition of the mobilephone 100, such as image recognition, facial recognition, speechrecognition, and text understanding, can be implemented by using theNPU.

The external memory interface 120 may be configured to connect to anexternal storage card such as a micro SD card, to extend a storagecapability of the mobile phone 100. The external storage cardcommunicates with the processor 110 through the external memoryinterface 120, to implement a data storage function. For example, filessuch as music and a video are stored in the external storage card.

The internal memory 121 may be configured to store computer-executableprogram code. The executable program code includes an instruction. Theprocessor 110 runs the instruction stored in the internal memory 121, toimplement various function applications of the mobile phone 100 and dataprocessing. The internal memory 121 may include a program storage areaand a data storage area. The program storage area may store an operatingsystem, an application required by at least one function (for example, asound playing function or an image playing function), and the like. Thedata storage area may store data (for example, audio data or an addressbook) created during use of the mobile phone 100, and the like. Inaddition, the internal memory 121 may include a high-speed random accessmemory, and may further include a nonvolatile memory, for example, atleast one magnetic disk storage device, a flash memory device, or auniversal flash storage (universal flash storage, UFS).

The mobile phone 100 may implement an audio function, for example, musicplaying and recording, through the audio module 170, the speaker 170A,the receiver 170B, the microphone 170A, the headset jack 170D, theapplication processor, and the like.

The audio module 170 is configured to convert digital audio informationinto an analog audio signal for output, and is also configured toconvert analog audio input into a digital audio signal. The audio module170 may be further configured to: code and decode an audio signal. Insome embodiments, the audio module 170 may be disposed in the processor110, or some function modules of the audio module 170 are disposed inthe processor 110.

The speaker 170A, also referred to as a “horn”, is configured to convertan audio electrical signal into a sound signal. The mobile phone 100 maylisten to music by using the speaker 170A, or listen to a hands-freecall.

The receiver 170B, also referred to as an “earpiece”, is configured toconvert an audio electrical signal into a sound signal. When a call isanswered or voice information is received by using the mobile phone 100,the receiver 170B may be put close to a human ear to listen to a voice.

The microphone 170C, also referred to as a “mike” or a “microphone”, isconfigured to convert a sound signal into an electrical signal. Whenmaking a call or sending voice information, a user may make a sound bymoving a human mouth close to the microphone 170C to input a soundsignal to the microphone 170C. At least one microphone 170C may bedisposed in the mobile phone 100. In some other embodiments, twomicrophones 170C may be disposed in the mobile phone 100, to collect asound signal and further implement a noise reduction function. In someother embodiments, three, four, or more microphones 170C mayalternatively be disposed in the mobile phone 100, to collect a soundsignal, reduce noise, further identify a sound source, implement adirectional recording function, and the like.

The headset jack 170D is configured to connect to a wired headset. Theheadset jack 170D may be a USB interface 130, or may be a 3.5 mm openmobile terminal platform (open mobile terminal platform, OMTP) standardinterface or cellular telecommunications industry association of the USA(cellular telecommunications industry association of the USA, CTIA)standard interface.

The pressure sensor 180A is configured to sense a pressure signal, andcan convert the pressure signal into an electrical signal. In someembodiments, the pressure sensor 180A may be disposed on the display194. There are a plurality of types of pressure sensors 180A, forexample, a resistive pressure sensor, an inductive pressure sensor, acapacitive pressure sensor. The capacitive pressure sensor may includeat least two parallel plates made of conductive materials. When a forceis applied to the pressure sensor 180A, capacitance between electrodeschanges. The mobile phone 100 determines pressure intensity based on thechange of the capacitance. When a touch operation is performed on thedisplay 194, the mobile phone 100 detects intensity of the touchoperation by using the pressure sensor 180A. The mobile phone 100 mayalso calculate a touch location based on a detection signal of thepressure sensor 180A. In some embodiments, touch operations that areperformed at a same touch location but have different touch operationintensity may correspond to different operation instructions. Forexample, when a touch operation whose touch operation intensity is lessthan a first pressure threshold is performed on a Messages icon, aninstruction for viewing an SMS message is executed. When a touchoperation whose touch operation intensity is greater than or equal tothe first pressure threshold is performed on a Messages icon, aninstruction for creating a new SMS message is executed.

The gyro sensor 180B may be configured to determine a moving posture ofthe mobile phone 100. In some embodiments, an angular velocity of themobile phone 100 around three axes (namely, x, y, and z axes) may bedetermined by using the gyro sensor 180B. The gyro sensor 180B may beconfigured to perform image stabilization during photographing. Forexample, when a shutter is pressed, the gyro sensor 180B detects anangle at which the mobile phone 100 jitters, obtains, throughcalculation based on the angle, a distance for which a lens module needsto compensate, and allows a lens to cancel the jitter of the mobilephone 100 through reverse exercise, to implement image stabilization.The gyro sensor 180B may be further used in navigation and motionsensing game scenarios.

The barometric pressure sensor 180C is configured to measure barometricpressure. In some embodiments, the mobile phone 100 calculates analtitude by using the barometric pressure measured by the barometricpressure sensor 180C, to assist in positioning and navigation.

The magnetic sensor 180D includes a Hall sensor. The mobile phone 100may detect opening and closing of a flip leather case by using themagnetic sensor 180D. In some embodiments, when the mobile phone 100 isa clamshell phone, the mobile phone 100 may detect opening/closing of aflip cover based on the magnetic sensor 180D. Further, a feature such asautomatic unlocking of the flip cover is set based on a detectedopening/closing state of the leather case or a detected opening/closingstate of the flip cover.

The acceleration sensor 180E may detect values of acceleration invarious directions (usually on three axes) of the mobile phone 100. Whenthe mobile phone 100 is still, a value and a direction of gravity may bedetected. The acceleration sensor 180E may be further configured toidentify a posture of the electronic device, and is applied toapplications such as landscape/portrait orientation switching and apedometer.

The distance sensor 180E is configured to measure a distance. The mobilephone 100 may measure a distance through infrared light or a laser. Insome embodiments, in a photographing scenario, the mobile phone 100 maymeasure a distance by using the distance sensor 180F, to implement fastfocusing.

The optical proximity sensor 180E may include a light-emitting diode(LED) and an optical detector, for example, a photodiode. Thelight-emitting diode may be an infrared light-emitting diode. The mobilephone 100 emits infrared light by using the light-emitting diode. Themobile phone 100 detects infrared reflected light from a nearby objectby using the photodiode. When sufficient reflected light is detected,the mobile phone 100 may determine that there is an object near themobile phone 100. When insufficient reflected light is detected, themobile phone 100 may determine that there is no object near the mobilephone 100. The mobile phone 100 may detect, by using the opticalproximity sensor 180G, that the user holds the mobile phone 100 close toan ear to make a call, so as to automatically turn off a screen forpower saving. The optical proximity sensor 180G may also be used in aleather case mode or a pocket mode to automatically unlock or lock thescreen.

The ambient light sensor 180L is configured to sense ambient lightintensity. The mobile phone 100 may adaptively adjust luminance of thedisplay 194 based on the sensed ambient light intensity. The ambientlight sensor 180L may also be configured to automatically adjust whitebalance during photographing. The ambient light sensor 180L may alsocooperate with the optical proximity sensor 180G to detect whether themobile phone 100 is in a pocket to prevent an accidental touch.

The fingerprint sensor 180H is configured to collect a fingerprint. Themobile phone 100 may use a feature of the collected fingerprint toimplement fingerprint unlocking, application access locking, fingerprintphotographing, fingerprint call answering, and the like.

The temperature sensor 180J is configured to detect a temperature. Insome embodiments, the mobile phone 100 executes a temperature processingpolicy based on the temperature detected by the temperature sensor 180J.For example, when the temperature reported by the temperature sensor180J exceeds a threshold, the mobile phone 100 lowers performance of aprocessor near the temperature sensor 180J, to reduce power consumptionfor thermal protection. In some other embodiments, when the temperatureis less than another threshold, the mobile phone 100 heats the battery142 to prevent the mobile phone 100 from being shut down abnormallybecause of a low temperature. In some other embodiments, when thetemperature is less than still another threshold, the mobile phone 100boosts an output voltage of the battery 142 to avoid abnormal shutdowncaused by a low temperature.

The touch sensor 180K is also referred to as a “touch panel”. The touchsensor 180K may be disposed. on the display 194, and the touch sensor180K and the display 194 form a touchscreen, which is also referred toas a “touch screen”. The touch sensor 180K is configured to detect atouch operation performed on or near the touch sensor 180K. The touchsensor may transfer the detected touch operation to the applicationprocessor, to determine a type of a touch event. Visual output relatedto the touch operation may be provided by using the display 194. In someother embodiments, the touch sensor 180K may alternatively be disposedon a surface of the mobile phone 100 and is at a location different fromthat of the display 194.

The bone conduction sensor 180M may obtain a vibration signal. In someembodiments, the bone conduction sensor 180M may obtain a vibrationsignal of a vibration bone of a human vocal part. The bone conductionsensor 180M may also be in contact with a human pulse, and receive ablood pressure beating signal. In some embodiments, the bone conductionsensor 180M may alternatively be disposed in the headset to form a boneconduction headset. The audio module 170 may obtain a voice signalthrough parsing based on the vibration signal that is of the vibrationbone of the vocal part and that is obtained by the bone conductionsensor 180M, to implement a voice function. The application processormay parse heart rate information based on the blood pressure beatingsignal obtained by the bone conduction sensor 180M, to implement a heartrate detection function.

The button 190 includes a power button, a volume button, and the like.The key 190 may be a mechanical button or a touch button. The mobilephone 100 receives button input, and generates button signal inputrelated to a user setting and function control of the mobile phone 100.

The motor 191 may generate a vibration prompt. The motor 191 may beconfigured to produce an incoming call vibration prompt and a touchvibration feedback. For example, touch operations performed on differentapplications (for example, photographing and audio playing) maycorrespond to different vibration feedback effects. The motor 191 mayalso correspond to different vibration feedback effects for touchoperations performed on different areas of the display 194. Differentapplication scenarios (for example, a time reminder, informationreceiving, an alarm clock, and a game) may also correspond to differentvibration feedback effects. A touch vibration feedback effect may befurther customized.

The indicator 192 may be an indicator light, and may be configured toindicate a charging status and a power change, or may be configured toindicate a message, a missed call, a notification, and the like.

The SIM card interface 195 is configured to connect to a SIM card. TheSIM card may be inserted into the SIM card interface 195 or plugged fromthe SIM card interface 195, to implement contact with or separation fromthe mobile phone 100. The mobile phone 100 may support one or N SIM cardinterfaces, where N is a positive integer greater than 1. The SIM cardinterface 195 may support a nano SIM card, a micro SIM card, a SIM card,and the like. A plurality of cards may be simultaneously inserted into asame SIM card interface 195. The plurality of cards may be of a sametype or of different types. The SIM card interface 195 may also becompatible with different types of SIM cards. The SIM card interface 195may also be compatible with an external storage card. The mobile phone100 interacts with a network by using the SIM card, to implementfunctions such as calling and data communication. In some embodiments,the mobile phone 100 uses an eSIM, namely, an embedded SIM card. TheeSIM card may be embedded in the mobile phone 100, and cannot beseparated from the mobile phone 100.

A software system of the mobile phone 100 may use a layeredarchitecture, an event-driven architecture, a microkernel architecture,a microservice architecture, or a cloud architecture. In this embodimentof this application, an Android system with the layered architecture isused as an example to describe a software structure of the mobile phone100.

FIG. 2 is a structural block diagram of software of a mobile phone 100according to an embodiment of this application.

In the layered architecture, software is divided into several layers,and each layer has a clear role and task. The layers communicate witheach other through a software interface. In some embodiments, theAndroid system is divided into four layers: an application layer, anapplication framework layer, an Android runtime (Android runtime) andsystem library, and a kernel layer from top to bottom.

The application layer may include a series of application packages.

As shown in FIG. 2, applications such as Camera, Gallery, Calendar,Phone, Map, Navigation, Bluetooth, Music, Video, and Messages may beinstalled at the application layer.

In this embodiment of this application, various types of exerciseapplications may be further installed at the application layer, forexample, one or more applications such as an app for running, an app foryoga, or an app for swimming. A user may use the exercise app to viewexercise information during exercise. For example, the user may viewinformation such as a running distance, a pace, and a heart rate in theexercise app during running.

The application framework layer provides an application programminginterface (application programming interface, API) and a programmingframework for an application at the application layer. The applicationframework layer includes some predefined functions.

As shown in FIG. 2, in this embodiment of this application, a serviceused to provide data analysis for the foregoing exercise app may be setat the application framework layer. For example, the service may bereferred to as an exercise analysis service in this embodiment of thisapplication. The exercise analysis service can monitor a running statusof the exercise app and function as a bridge between the exercise appand other apps to transfer service content in other apps to the exerciseapp for display or execution.

For example, when the exercise app is run at the application layer,exercise data of the user during exercise may be collected by using oneor more sensors in a sensor module, for example, an exercise speedexercise duration, and an exercise heart rate. After detecting that theexercise app is run, the exercise analysis service can obtain theexercise data collected by the exercise app. Further, the exerciseanalysis service may feed back service content that is related to thecurrent exercise data and that is in another application to the exerciseapp. For example, if the exercise data of the user who is performingyoga is collected, the exercise analysis service may obtain acorresponding yoga video from a video app and send the yoga video to theexercise app. Further, the exercise app may display or play the servicecontent that is of the another application and that is provided by theexercise analysis service.

In this way, in a process of completing the exercise by using theexercise app, the user can directly enjoy, in the exercise app, theservice content that is related to the exercise and that is provided bythe another application, and does not need to repeatedly switch betweendifferent apps or different display interfaces to search for contentrequired by the user during exercise. In this way, exercise experienceof the user when using the exercise app is improved.

Certainly, in addition to the foregoing exercise data, the exerciseanalysis service may further obtain current environment data, such astime, a temperature, and ambient light intensity, when the exercise appis run. Further, the exercise analysis service may determine, based onthe environment data and the exercise data, specific service content tobe fed back to the exercise app. This is described in detail in asubsequent embodiment. Therefore, details are not described herein.

In addition, as shown in FIG. 3, the mobile phone 100 may furtherinteract with a wearable device 200. The wearable device 200 may be adevice, for example, a smartwatch, a smart band, a smart helmet, or asmart headset. This is not limited in this embodiment of thisapplication. After the mobile phone 100 establishes a connection to thewearable device 200, the wearable device 200 may periodically sendcollected exercise data or environment data to the mobile phone 100.After the exercise analysis service in the mobile phone 100 detects thatthe exercise app starts to be run, the exercise analysis service mayprovide, in the exercise app according to the foregoing method and basedon the exercise data or the environment data last sent by the wearabledevice 200, service content that is of another application and that isrelated to current exercise for the user.

Certainly, the application framework layer may further include a windowmanager, a content provider, a view system, a phone manager, a resourcemanager, a notification manager, and the like.

The window manager is configured to manage a window program. The windowmanager may obtain a size of a display, determine whether there is astatus bar, lock a screen, take a screenshot, and the like. The contentprovider is configured to: store and obtain data, and enable the data tobe accessed by an application. The data may include a video, an image,audio, calls that are made and received, a browsing history and abookmark, a phone book, and the like. The view system includes visualcontrols such as a control for displaying a text and a control fordisplaying a picture. The view system may be configured to construct anapplication. A display interface may include one or more views. Forexample, a display interface including a Messages notification icon mayinclude a text display view and a picture display view. The phonemanager is configured to provide a communication function of the mobilephone 100, for example, management of a call status (including answeringor declining). The resource manager provides various resources for anapplication, such as a localized character string, an icon, a picture, alayout file, and a video file. The notification manager enables anapplication to display notification information in a status bar, and maybe configured to convey a notification message. The notification managermay automatically disappear after a short pause without requiring a userinteraction. For example, the notification manager is configured to:notify download completion, give a message notification, and the like.The notification manager may alternatively be a notification thatappears in a top status bar of the system in a form of a graph or ascroll bar text, for example, a notification of an application runningin the background or a notification that appears on the screen in a formof a dialog window. For example, text information is prompted in thestatus bar, a prompt tone is produced, the electronic device vibrates,or the indicator light blinks.

The Android runtime includes a kernel library and a virtual machine. TheAndroid runtime is responsible for scheduling and management of theAndroid system.

The kernel library includes two parts: a function that needs to beinvoked in java language and a kernel library of Android.

The application layer and the application framework layer run on thevirtual machine. The virtual machine executes java files at theapplication layer and the application framework layer as binary files.The virtual machine is configured to perform functions such as objectlifecycle management, stack management, thread management, security andexception management, and garbage collection.

The system library may include a plurality of function modules, forexample, a surface manager (surface manager), a media library (MediaLibraries), a three-dimensional graphics processing library (forexample, OpenGL ES), and a 2D graphics engine (for example, SGL).

The surface manager is configured to: manage a display subsystem andprovide fusion of 2D and 3D layers for a plurality of applications.

The media library supports playback and recording of a plurality ofcommonly used audio and video formats, static image files, and the like.The media library may support a plurality of audio and video codingformats such as MPEG-4, H.264, MP3, AAC, AMR, JPG, and PNG.

The three-dimensional graphics processing library is configured toimplement three-dimensional graphics drawing, image rendering,composition, layer processing, and the like.

The 2D graphics engine is a drawing engine for 2D drawing.

The kernel layer is a layer between hardware and software. The kernellayer includes at least a display driver, a camera driver, an audiodriver, a sensor driver, and the like. This is not limited in thisembodiment of this application.

The following describes in detail, with reference to the accompanyingdrawings by using an example in which a mobile phone is used as anelectronic device, a recommendation method based on an exercise statusof a user that is provided in the embodiments of this application. Asshown in FIG. 4, the method includes the following steps.

S401: The mobile phone obtains exercise data of the user when running anexercise app.

The exercise data may be used to reflect a specific type of exercisethat is being performed by the user, for example, walking, running,swimming, cycling, or yoga. This is not limited in this embodiment ofthis application.

For example, after the mobile phone detects an operation of starting theexercise app by the user, as shown in FIG. 5, the mobile phone maydisplay a home page 501 of the exercise app. On the home page 501, theuser may select a specific exercise type, for example, walking, running,cycling, or yoga. In this case, if detecting that the user selects theexercise type of running on the home page 501, the mobile phone maylearn that the current exercise data of the user is running. Inaddition, the mobile phone may further jump from the home page 501 to aninterface of the exercise type of running.

Alternatively, after detecting that the user starts the exercise app orthe user selects the exercise type of running, the mobile phone mayfurther collect current exercise data of the mobile phone by using oneor more sensors such as an acceleration sensor, a gyroscope, a GPS, abarometric pressure altitude sensor, or a distance sensor. For example,the exercise data may be a moving speed, a moving direction, a mobilephone posture, a climbing speed, and contact pressure of the mobilephone. If the user carries the mobile phone to do exercise, thecollected exercise data of the mobile phone may also be used as theexercise data of the user to reflect the current exercise type of theuser. For example, if the mobile phone determines, based on thecollected exercise data, that the current exercise type of the user isrunning, the mobile phone may automatically jump from the home page 501to the interface of the exercise type of running.

Alternatively, the user may wear a wearable device when using theexercise app to do exercise. In this case, after detecting that the userstarts the exercise app, the mobile phone may further detect whether awireless connection (for example, a Bluetooth connection) is establishedbetween the mobile phone and the wearable device. If the mobile phoneestablishes the wireless connection to the wearable device, the mobilephone may further obtain the exercise data of the user from the wearabledevice. For example, one or more sensors in the wearable device maycollect the current exercise data of the user, and periodically reportthe collected exercise data to the mobile phone by using a Bluetoothmodule, so that the mobile phone can obtain the exercise data of theuser.

In the foregoing embodiment, an example in which the user manuallystarts the exercise app to trigger the mobile phone to start to run theexercise app is used for description. It may be understood that themobile phone may alternatively start the exercise app automatically. Forexample, it may be preset in the mobile phone that the mobile phoneautomatically starts the exercise app when the mobile phone is poweredon. In this case, after the mobile phone is powered on, the mobile phonemay automatically start the exercise app to start running. For anotherexample, the sensor in the mobile phone may periodically collect currentexercise data and report the current exercise data to an exerciseanalysis service at a framework layer. When the exercise analysisservice determines, based on the exercise data, that the user is in anexercising state, the mobile phone may be triggered to automaticallystart and run the exercise app.

In addition, that the mobile phone runs the exercise app may mean thatthe mobile phone runs the exercise app in the foreground, or may meanthat the mobile phone runs the exercise app in the background. This isnot limited in this embodiment of this application.

S402 (optional): The mobile phone obtains current environment data whenrunning the exercise app.

The foregoing environment data may be used to reflect an environmentfeature during exercise of the user. For example, the environment datamay be one or more pieces of data such as time, ambient light intensity,humidity, a wind scale, and a geographical location.

Similar to that in step S401, when running the exercise app, the mobilephone may collect the current environment data of the mobile phone byusing one or more sensors such as a hygrometer, a thermometer, anambient light sensor, and an infrared sensor. Alternatively, thesesensors may be disposed in the wearable device in advance. Whendetecting that the user starts the exercise app in the mobile phone andthe user wears the wearable device, the mobile phone may obtain, fromthe wearable device, the current environment data collected by thewearable device.

S403: The mobile phone determines a current exercise scenario based onthe exercise data and the environment data.

For example, the mobile phone may determine, by using a prestoredexercise model, the exercise type corresponding to the exercise data. Asshown in Table 1, a correspondence (for example, a first correspondence)between different exercise types and different exercise models may bepreset in the mobile phone. For example, when an exercise speed in theexercise model is 2 to 3 m/s, a corresponding exercise type is jogging.When contact pressure on a device surface in the exercise model is lessthan 10000 Pa, a corresponding exercise type is swimming. When aclimbing speed in the exercise model is greater than 0.2 m/s, acorresponding exercise type is mountain climbing. In this case, themobile phone may find a corresponding exercise model in Table 1 based onthe exercise data obtained in step S401, and then determine thecorresponding exercise type.

TABLE 1 Exercise type Exercise model Jogging The speed is 2 to 3 m/sSwimming The contact pressure on the device surface is less than 10000Pa Mountain climbing The climbing speed is greater than 0.2 m/s

For example, the mobile phone may determine, by using a prestoredenvironment model, the environment feature corresponding to theenvironment data. As shown in Table 2, a correspondence (for example, asecond correspondence) between different environment features andenvironment models may be further preset in the mobile phone. Forexample, when ambient light intensity in the environment model isbetween 0.001 lm and 0.3 lm, a corresponding environment feature isnighttime. When ambient light intensity in the environment model isbetween 50 lm and 500 lm, a corresponding environment feature is outdooron a cloudy day. When time in the environment model is before 9 o'clockin the morning and the temperature is lower than 10° C., a correspondingenvironment feature is winter morning. In this case, the mobile phonemay find a corresponding environment model in Table 2 based on theenvironment data obtained in step S402, and then determine thecorresponding environment feature.

TABLE 2 Environment feature Environment model Nighttime Luminance: 0.001to 0.3 lm Outdoor on a cloudy day Luminance: 50 to 500 lm Winter morningTime: before 9:00; temperature: lower than 10° C.

After the mobile phone separately determines the exercise type and theenvironment feature based on the obtained exercise data and the obtainedenvironment data, the mobile phone may synthesize the determinedexercise type and environment feature into the corresponding exercisescenario. For example, if the exercise type determined by the mobilephone in Table 1 is jogging, and the environment feature determined inTable 2 is winter morning, after synthesizing the exercise type and theenvironment feature, the mobile phone may determine that thecorresponding exercise scenario is jogging in winter morning. In thisway, when the user performs different exercise in different scenarios,the mobile phone may determine a corresponding exercise scenario byobtaining corresponding exercise data and environment data. It may belearned that the exercise scenario in this embodiment of thisapplication may reflect at least the type of exercise that is beingperformed by the user, for example, running, cycling, swimming, mountainclimbing, or yoga. Further, the exercise scenario determined by themobile phone may further reflect the specific environment feature duringexercise performed by the user, for example, time, a location, a season,a temperature, humidity, or light intensity during exercise.

It should be noted that the foregoing step S402 (to be specific, themobile phone obtains the current environment data when running theexercise app) is an optional step. In other words, the mobile phone maydetermine the current exercise scenario based on only the obtainedexercise data. For example, the mobile phone may use the exercise typecorresponding to the obtained exercise data as the current exercisescenario by using Table 1. In addition, a sequence of performing stepsS401 and S402 is not limited in this embodiment of this application. Forexample, the mobile phone may first obtain the current environment data,and then obtain the current exercise data. Alternatively, the mobilephone may first obtain the current exercise data, and then obtain thecurrent environment data. Certainly, the mobile phone may alternativelyobtain the environment data and the exercise data at the same time. Thisis not limited in this embodiment of this application.

In some other embodiments, as shown in Table 3, a correspondence amongan exercise model, an environment model, and an exercise scenario may bepre-established in the mobile phone. Further, the mobile phone may findthe corresponding exercise model and environment model in Table 3 basedon the exercise data and the environment data that are obtained in stepsS401 and S402, and then determine the exercise scenario corresponding tothe exercise data and the environment data (that is, an exercisescenario corresponding to the found exercise model and environmentmodel).

TABLE 3 Exercise model Environment model Exercise scenario Speed: 2 to 3m/s Luminance: 0.001 to 0.3 lm Jogging at night Speed: 2 to 3 m/sLuminance: 50 to 500 lm Outdoor jogging on a cloudy day Climbing Time:before 9:00; Climbing in the speed > 0.2 m/s temperature < 10° C. wintermorning

Alternatively, the mobile phone may further send the obtained exercisedata and environment data to a server. Further, the server may determinethe current exercise scenario based on the exercise data and theenvironment data, and send the determined exercise scenario to themobile phone, so that the mobile phone can determine the currentexercise scenario.

S404: The mobile phone obtains recommended content corresponding to thecurrent exercise scenario.

For example, for different exercise scenarios, one or more pieces ofcorresponding recommended content may be preset on the mobile phone. Forexample, when the exercise scenario is running on a treadmill,corresponding recommended content may be set to a song 1 and a song 2.When the exercise scenario is jogging at night, correspondingrecommended content may be set to a weather forecast and a song 3. Whenthe exercise scenario is winter yoga, corresponding recommended contentmay be set to a yoga video and the like. In this way, the mobile phonemay determine, based on the current exercise scenario, the specificrecommended content recommended to the user in this exercise process. Indifferent exercise scenarios, the mobile phone may determine, for theuser, recommended content related to the current exercise scenario, andrecommend the recommended content to the user.

In some embodiments, the mobile phone may further determine, based on ahistorical behavior habit of the user, the recommended contentcorresponding to the current exercise scenario. In this case, in a sameexercise scenario, recommended content determined by the mobile phonefor different users is related to historical behavior habits of theusers, so that personalized and customized recommended content isprovided for the users during exercise.

For example, when running the exercise app, the mobile phone may collectstatistics on operation habits of the user in different exercisescenarios. For example, the exercise analysis service in the mobilephone may detect a running status of the exercise app in real time. Asshown in FIG. 6, when the user wears the wearable device to do exercise,if the exercise analysis service detects that the exercise app starts tobe run, the mobile phone may obtain current exercise data andenvironment data from the wearable device, and determine, based on theexercise data and the environment data, a specific exercise scenario inwhich the user is currently located. For descriptions of obtaining theexercise data and the environment data and determining the exercisescenario, refer to related descriptions of steps S401 to S403. Afterdetermining the current specific exercise scenario, the exerciseanalysis service may further continue to monitor an operation performedby the user or a function used by the user in a third-party app (forexample, a music application, a video application, and a weatherapplication), in other words, monitor service content provided by thethird-party app for the user in the current exercise scenario. Forexample, if detecting that the user starts the music app to listen tothe song 1 in a running scenario, the exercise analysis service may usethe song 1 as recommended content for the user in the running scenario.Further, the exercise analysis service may obtain resource informationof the song 1, and establish a correspondence between the runningscenario and the resource information of the song 1, in this way, instep S404, if the exercise analysis service determines that the currentexercise scenario is also the running scenario, the exercise analysisservice may determine, based on the foregoing correspondence, that therecommended content currently recommended to the user is the song 1.

It should be noted that, when the mobile phone detects that the useruses service content in the third-party app, the mobile phone maydetermine, according to a specific policy, whether to determine theservice content as the recommended content in the current exercisescenario. For example, if the mobile phone detects, in an outdoorjogging scenario for three consecutive times, that the user starts themusic app to play the song 1, the mobile phone may determine that theuser has a behavior habit of listening to the song 1 during outdoorjogging. In this case, the mobile phone may obtain the resourceinformation of the song 1. For example, the resource information may bea storage address of the song 1 in a memory, or the resource informationmay be a URL (uniform resource locator, uniform resource locator)address of the song 1.

In addition, in addition to monitoring the service content used by theuser in the third-party app, the mobile phone may further monitor theservice content used by the user in the exercise app. For example, inthe running scenario with the treadmill, if the mobile phone detectsthat the user has viewed heart rate information in the exercise app forfour consecutive times, and if the mobile phone detects that the userhas viewed an indoor temperature and humidity for three consecutivetimes, the mobile phone may determine a behavior habit of viewing theheart rate, the indoor temperature, and the indoor humidity when theuser runs on the treadmill. In this case, the mobile phone may recordresource information of heart rate information, temperature information,and humidity information.

In this case, as shown in Table 4, the mobile phone may establish acorrespondence between different exercise scenarios of the user anddifferent recommended content. Each piece of recommended content is abehavioral habit that is collected by the mobile phone and that isrelated to the behavioral habit of the user. In this case, in step S404,after determining the current exercise scenario, the mobile phone maydetermine, based on the correspondence shown in Table 4, resourceinformation (in Table 4, an example in which the URL address is resourceinformation is used) of one or more pieces of recommended contentrelated to the behavior habit of the user in the current exercisescenario. Then, the mobile phone may obtain specific recommended contentbased on the URL address of the recommended content. In this way, themobile phone may customize personalized recommended content fordifferent users and different exercise scenarios.

TABLE 4 Recommended content Fitness and Exercise health Environmentscenario Video/Audio information information Jogging at URL address ofURL address of URL address of night a song 1: xxx; a running time aweather URL address of period and a forecast: xxx a song 2: xxx; runningdistance: xxx Running on URL address of URL address of URL address of atreadmill a video A: xxx a running heart indoor temperature rate: xxxinformation and indoor humidity information: xxx Climbing in . . . . . .. . . the winter morning

In some other embodiments, the mobile phone may further determine, basedon a user profile (user profile) of the user, the recommended contentcorresponding to the current exercise scenario. Specifically, the mobilephone may abstract an information panorama of the user, namely, the userprofile of the user, by collecting and analyzing various kinds ofbehavior data of the user who uses the mobile phone. For example, theuser profile usually includes one or more user tags used to reflect auser characteristic. As shown in FIG. 7, the user tags of the userinclude but are not limited to the following six types of tags: a basicattribute, a social attribute, a behavioral habit, interests andhobbies, a psychological attribute, a mobile phone usage preference, andthe like.

The basic attribute category includes but is not limited to personalinformation and a physiological feature. The personal informationcategory includes but is not limited to: a name, an age, a certificatetype, education, a constellation, belief, a marital status, and amailbox.

The social attribute category includes but is not limited to: anindustry/occupation, a position, an income level, child information, avehicle usage status, housing, a mobile phone, and a mobile networkoperator. The housing category may include: renting a house, owning ahouse, and repaying a loan. The mobile phone category may include: abrand and a price. The mobile network operator category may include: abrand, a network, a traffic characteristic, and a mobile number. Thebrand category may include: China Mobile, China Unicorn, China Telecom,and others. The network category may include: none, 2G, 3G, and 4G. Thetraffic characteristic category may include: high, medium, and low.

The behavior habit category includes but is not limited to: ageographical location, a living habit, a transportation manner, a hoteltype, an economic/wealth management feature, a catering habit, ashopping feature, and payment information. The living habit category mayinclude: rest time, home time, work time, computer internet access time,and time for buying vegetables and shopping. The shopping featurecategory may include a shopping category and a shopping mode. Thepayment information category may include: payment time, a payment place,a payment mode, a single payment amount, and a total payment amount.

The interests and hobbies category include but are not limited to:reading preference, news preference, video preference, music preference,exercise preference, and travel preference, The reading preferencecategory may include: a reading frequency, a reading time segment, atotal reading time period, and a reading classification.

The psychological attribute category includes but is not limited to: alifestyle, personality, and values.

The mobile phone usage preference category includes but is not limitedto: application preference, a notification reminder, an in-appoperation, commonly used by a user, a system application, and commonsettings.

In this case, in step S404, after determining the current exercisescenario, the mobile phone may determine, for the user based on the userprofile of the user, the recommended content corresponding to thecurrent exercise scenario. For example, if the user profile of the userincludes two user tags: reading and history, the mobile phone may use,as the recommended content in the current exercise scenario, an e-bookrelated to history that is recently read by the user. If the userprofile of the user includes three user tags: music, pop, and TaylorSwift, the mobile phone may use one or more songs whose singer name isTaylor Swift as the recommended content in the current exercisescenario.

Certainly, the mobile phone may alternatively send a recommendationrequest to the server, to request the server to determine therecommended content corresponding to the current exercise scenario forthe mobile phone, and return the determined recommended content to themobile phone. This is not limited in this embodiment of thisapplication.

S405: The mobile phone displays or plays the recommended content whenrunning the exercise app.

For example, the mobile phone may display the recommended content on adisplay interface of the exercise app. Alternatively, the mobile phonemay play the foregoing recommended content when running the exerciseapp. For example, after obtaining the recommended content correspondingto the current exercise scenario, the mobile phone may automaticallydisplay detailed information or a shortcut of the recommended content onthe display interface of the exercise app. When displaying the detailinformation of the recommended content, the mobile phone may alsoautomatically play the detail information of the recommended content ina voice manner. When displaying the shortcut of the recommended content,if detecting that the user selects the shortcut, the mobile phone maystart to display or play the detailed information of the recommendedcontent. Alternatively, after obtaining the recommended contentcorresponding to the current exercise scenario, the mobile phone mayfurther automatically play the recommended content in the voice mannerwhen running the exercise app. Alternatively, the mobile phone mayfurther respond to a gesture of the user to broadcast the recommendedcontent by voice. When broadcasting the recommended content by voice,the mobile phone may display the recommended content on the displayinterface of the exercise app, or may not display the recommendedcontent on the display interface of the exercise app. This is notlimited in this embodiment of this application.

The exercise app in FIG. 5 is still used as an example, after detectingthat the user for example, a user Amy) selects the exercise type ofrunning on a home page 501, the mobile phone may determine, byperforming steps S401 to S403, that the current exercise scenario isrunning on the treadmill, and then, the mobile phone may determine, byperforming step S404, that the recommended content corresponding to theexercise scenario of running on the treadmill is the song 1, the heartrate information, and the indoor temperature and humidity. In this case,as shown in FIG. 8, when displaying a running interface 701 in theexercise app, the mobile phone may simultaneously display detailedinformation of the foregoing three pieces of recommended content(namely, recommended content 702 to 704) on the forming interface 701.In this way, after opening the running interface 701 in the exerciseapp, the user can see display content in the running interface 701, andsee content (such as a lyrics and a singer) of the song 1, the heartrate information during exercise, and the current indoor temperature andhumidity.

Because the recommended content displayed in the running interface 701of the mobile phone is related to the current exercise scenario of theuser, in other words, service content that may be required when the userruns on the treadmill, the user may also view specific details of theservice content when viewing the running interface 701, so that aquantity of times of jumping and switching between a plurality ofinterfaces of the mobile phone during exercise of the user is reduced,and exercise experience of the user is improved.

For example, if detecting that an exercise scenario in which the user(for example, the user Amy) is currently located is an indoor yogascenario, the mobile phone may determine that recommended contentrelated to the indoor yoga scenario is a yoga video and heatinformation. Further, as shown in FIG. 9, the mobile phone may display ayoga video (namely, recommended content 802) recommended to the user andreal-time heat information (namely, recommended content 803) on a yogainterface 801 of the exercise app. The recommended content determined bythe mobile phone may be service content provided by another app otherthan the exercise app, or the recommended content may be service contentprovided by another interface in the exercise app other than the currentinterface. This is not limited in this embodiment of this application.

Further, the recommended content displayed for the user on the runninginterface 701 may be related to a behavior habit of the user when theuser runs on the treadmill. In other words, each piece of recommendedcontent displayed in the running interface 701 of the mobile phone maybe frequently used by the user when the user normally runs on thetreadmill, so that the mobile phone can provide personalized recommendedcontent for different users based on behavior habits of the users.

For example, if another user (for example, a user Sam) also opens arunning interface of the exercise app in the running scenario of runningon the treadmill, because the user Sam often uses a weather forecastfunction and a radio function in a mobile phone when running on thetreadmill, the mobile phone may use a weather forecast of next one hourin a weather application and a channel A in a radio application as therecommend content. In this case, in response to an operation of openingthe running interface 901 of the exercise app by the user Sam, as shownin FIG. 10, the mobile phone may display the weather forecast (that is,recommended content 902) of the next one hour and the channel A(recommended content 903) in the running interface 901. In this way, themobile phone may display corresponding recommended content to the userin the exercise app based on use habits of different users in differentexercise scenarios.

It should be noted that, when the recommended content determined by themobile phone includes audio content (for example, the recommendedcontent 702, the recommended content 802, and the recommended content903), the mobile phone may automatically play the corresponding audiocontent when displaying the recommended content. Certainly, the mobilephone may also play the corresponding audio content when detecting thatthe user triggers the recommended content. For example, after detectingthat the user taps the recommended content 702 in the running interface701, the mobile phone may start to play the song 1 corresponding to therecommended content 702.

In addition, after the mobile phone displays the recommended content, ifdetecting that the user taps a piece of recommended content, the mobilephone may jump to a related interface of an app to which the recommendedcontent belongs. For example, as shown in FIG. 11, if detecting that theuser taps the recommended content 802 in the yoga interface 801, themobile phone may display an interface 1001 on which the yoga video inthe video app is located. In other words, the user may accurately jump,in the exercise app, to an interface in which the recommended contentdetermined by the mobile phone is located.

In some other embodiments, when displaying the recommended content inthe interface of the exercise app, the mobile phone may display only theshortcut of the recommended content, instead of displaying the specificinformation in the recommended content. For example, after the userselects the exercise type of running on the home page 501, the mobilephone may determine that corresponding recommended content is the song1, the heart rate information, and the indoor temperature and humidity.Further, as shown in FIG. 12, the mobile phone may display a shortcut1101 of music, a shortcut 1102 of heart rate information, and a shortcut1103 of indoor temperature and humidity in the running interface 701.Subsequently, if detecting that the user taps the shortcut 1101, themobile phone may start to play the song 1. Similarly, if detecting thatthe user taps the shortcut 1102, the mobile phone may start to broadcastthe current heart rate information of the user by voice. In other words,if detecting that the user selects a shortcut, the mobile phone maydirectly display or play detailed information of correspondingrecommended content in the display interface of the exercise app, anddoes not need to jump to a display interface corresponding to theshortcut, so that a quantity of times that the user switches betweendisplay interfaces during exercise is reduced, and user experienceduring exercise is improved. Certainly, if detecting that the userselects a shortcut, the mobile phone may also jump to the displayinterface corresponding to the shortcut. This is not limited in thisembodiment of this application.

In some other embodiments, after the mobile phone determines therecommended content corresponding to the current exercise scenario, ifthe mobile phone is still running the exercise app, it indicates thatthe user is in an exercise process. In this case, the mobile phone mayalso play the foregoing recommended content in a voice manner. Forexample, after determining that the current exercise scenario is runningon the treadmill, the mobile phone may obtain the recommended contentcorresponding to the exercise scenario of running on the treadmill: thesong 1, the heart rate information, and the indoor temperature andhumidity. In this case, as shown in FIG. 13, if the mobile phone isrunning the exercise app at this time, the mobile phone may play theforegoing recommended content in the voice manner. For example, themobile phone may repeatedly play the song 1. For another example, themobile phone may broadcast the current heart rate information to theuser by voice every one minute. For another example, the mobile phonemay broadcast the current indoor temperature and humidity to the user byvoice every two minutes. In this case, the mobile phone may display therecommended content in the running interface 701 of the exercise app, ormay not display the recommended content in the running interface 701.This is not limited in this embodiment of this application.

For example, the mobile phone may further be preset to trigger, in atriggering manner such as tapping a device, shaking a device, or liftinga hand, the mobile phone to play the recommended content. For example,if detecting that the user taps a screen of the mobile phone once, themobile phone may play the song 1. If detecting that the user taps thescreen twice consecutively, the mobile phone may play the currentlydetected heart rate information. If detecting that the user taps thescreen three consecutive times, the mobile phone may play the currentlydetected indoor temperature and humidity. Certainly, the mobile phonemay also automatically play the foregoing recommended content whenrunning the exercise app. This is not limited in this embodiment of thisapplication.

In some other embodiments, after the mobile phone obtains therecommended content corresponding to the current exercise scenario, themobile phone may further choose, based on the determined exercisescenario, to play the recommended content in the voice manner or displaythe recommended content in the interface. Further, the mobile phone mayperform step S405, in other words, the mobile phone may display or playthe recommended content. For example, if the mobile phone determinesthat the current exercise scenario is an indoor exercise scenario, forexample, running on the treadmill, the mobile phone may choose todisplay the determined recommended content in the interface of theexercise app. Correspondingly, if the mobile phone determines that thecurrent exercise scenario is an outdoor exercise scenario, for example,jogging in the morning, the mobile phone may choose to play theforegoing recommended content in the voice manner. For another example,if the mobile phone determines that the current exercise scenario is asingle-person exercise scenario, for example, yoga before sleep, themobile phone may choose to display the determined recommended content inthe interface of the exercise app. Correspondingly, if the mobile phonedetermines that the current exercise scenario is a multi-person exercisescenario, for example, outdoor basketball, the mobile phone may chooseto play the foregoing recommended content in the voice manner. In thisway, the mobile phone may select, based on features of differentexercise scenarios, an appropriate manner to recommend the recommendedcontent determined by the mobile phone to the user, to improve exerciseexperience of the user.

Further, when displaying the recommended content in the interface of theexercise app, the mobile phone may also display the recommended contentby using different display effects according to the current exercisescenario. That the foregoing recommended content is weather informationis used as an example. As shown in FIG. 14(a), if the current weatherinformation is a sunny day when displaying the running interface, themobile phone may set an interface background to a display element 1corresponding to the sunny day. Correspondingly, as shown in FIG. 14(b),if the current weather information is a rainy day, when displaying therunning interface, the mobile phone may set the interface background toa display element 2 corresponding to the rainy day. In this way, indifferent exercise scenarios, the mobile phone may display thedetermined recommended content to the user in different interactionmanners, so as to improve human-computer interaction friendliness.

For example, when the user wears the wearable device to do exercise,related service content is recommended to the user. As shown in FIG. 15,an exercise analysis service in a mobile phone may detect a runningstatus of an exercise app in real time. If the exercise analysis servicedetects that the exercise app starts to be run, the mobile phone mayobtain current exercise data and environment data from the wearabledevice, and determine, based on the exercise data and the environmentdata, a specific exercise scenario in which the user is currentlylocated. For descriptions of obtaining the exercise data and theenvironment data and determining the exercise scenario, refer to relateddescriptions of steps S401 to S403. After the current specific exercisescenario is determined, as described in step S404, the exercise analysisservice may determine, based on the correspondence that is between theexercise scenario and the recommended content and that is shown in Table4, recommended content that matches the current exercise scenario.Further, the exercise analysis service may obtain the recommendedcontent from a corresponding third-party app. For example, the exerciseanalysis service may obtain the recommended content from the third-partyapp based on a URL of the recommended content. Further, the exerciseanalysis service may display the recommended content or play therecommended content in a display interface of the exercise app to theuser.

In some embodiments, when displaying the recommended content in theinterface of the exercise app, the mobile phone may use the recommendedcontent as an internal display element of the exercise app to constructan interface layout of the exercise app. For example, after obtaining,by performing steps S401 to S404, the recommended content correspondingto the current exercise scenario, the exercise analysis service in themobile phone may transfer the recommended content to the exercise app atan application layer. The exercise app may divide the display interfaceinto a variable area and a fixed area in advance. The variable area isused to display the recommended content related to the current exercisescenario, and the displayed content in the variable area may change withthe current exercise scenario or a use habit of the user. The fixed areamay be used to display a display element preset in the exercise app, anda display element in the fixed area generally does not change. As shownin FIG. 8, the exercise app may preset an area A in an entire interfaceas the variable area, and set another part in the interface as the fixedarea. In this case, after obtaining the recommended content 702 to 704,the exercise app may display the recommended content 702 to 704 in thearea A.

In some other embodiments, the mobile phone may further set anindependent application (for example, a recommendation app) to displaythe foregoing recommended content. The recommendation app may be, forexample, a system-level application. When the exercise app is run, therecommendation app may display, in the interface of the exercise app,the recommended content obtained by the exercise analysis service. Forexample, as shown in FIG. 9, after obtaining the recommended content 803corresponding to the indoor yogan exercise scenario, the exerciseanalysis service may transfer the recommended content 803 to therecommendation app at the application layer. The recommendation app maydisplay the recommended content 803 in a floating window in the yogainterface 801 of the exercise app. The user can drag the floating windowto change a position of the recommended content in the currentinterface. In addition, after playing of the recommended content in thefloating window is finished, the mobile phone may automatically hide thefloating window, to avoid blocking the displayed content in theinterface of the exercise app. Alternatively, as shown in FIG. 10, afterthe recommendation app obtains the recommended content 902 and therecommended content 903 that correspond to the exercise scenario ofrunning on the treadmill, the recommendation app may display therecommended content 902 and the recommended content 903 in a card, afloating window, or the like in a blank position in the runninginterface 901. Alternatively, the recommendation app may furthernegotiate with the exercise app by using the exercise analysis serviceabout how to display the foregoing recommended content. For example, therecommendation app may request the exercise app to reserve displaypositions for the recommended content 902 and the recommended content903. The exercise app may arrange each display element in the exerciseapp based on the request of the recommendation app, and send informationabout the display positions reserved for the recommended content 902 andthe recommended content 903 to the recommendation app. In this way, therecommendation app may display the recommended content 902 and therecommended content 903 in the corresponding positions in the displayinterface of the exercise app based on the information about the displaypositions sent by the exercise app. This is not limited in thisembodiment of this application.

As shown in FIG. 16, an embodiment of this application discloses anelectronic device, including: a touchscreen 1601, where the touchscreen1601 includes a touch-sensitive surface 1606 and a display 1607; one ormore processors 1602; a memory 1603; one or more sensors 1608; one ormore application programs (not shown); and one or more computer programs1604. The foregoing components may be connected by using one or morecommunications buses 1605. The one or more computer programs 1604 arestored in the memory 1603 and are executed by the one or more processors1602. The one or more computer programs 1604 include an instruction, andthe instruction may be used to perform the steps in the correspondingembodiments.

For example, the processor 1602 may be specifically the processor 110shown in FIG. 1. The memory 1603 may be specifically the internal memory121 and/or the external memory 120 shown in FIG. 1. The display 1607 maybe specifically the display 194 shown in FIG. 1. The sensor 1608 may bespecifically one or more sensors in the sensor module 180 shown inFIG. 1. The touch-sensitive surface 1606 may be specifically the touchsensor 180K in the sensor module 180 shown in FIG. 1. This is notlimited in this embodiment of this application.

In some embodiments, this application further provides a graphical userinterface (GUI). The graphical user interface may be stored in anelectronic device. For example, the electronic device may be theelectronic device shown in FIG. 1 or FIG. 16.

When the electronic device is in a first exercise scenario, thegraphical user interface may include a first GUI displayed on thetouchscreen. The first GUI may be a first display interface of anexercise app, and the first display interface includes first recommendedcontent corresponding to the first exercise scenario. For example, whenthe electronic device detects that a current exercise scenario is arunning scenario, as shown in FIG. 8, the electronic device may displaythe running interface 701 of the exercise app, where the runninginterface 701 includes the recommended content 702 to 704 determined bythe electronic device. The recommended content 702 to 704 is related tothe current exercise scenario (namely, the running scenario). Further,the recommended content 702 to 704 may he generated based on ahistorical use habit of a user in the running scenario.

When the electronic device is in a second exercise scenario, thegraphical user interface may include a second GUI displayed on thetouchscreen. The second GUI may be a second display interface of theexercise app, and the second display interface includes secondrecommended content corresponding to the second exercise scenario. Forexample, when the electronic device detects that the current exercisescenario is a yoga scenario, as shown in FIG. 9, the electronic devicemay display the yoga interface 801 of the exercise app, where the yogainterface 801 includes the recommended content 802 to 803 determined bythe electronic device. The recommended content 802 to 803 is related tothe current exercise scenario (namely, the yoga scenario). Further, therecommended content 802 to 803 may also be generated based on ahistorical use habit of the user in the yoga scenario.

The foregoing descriptions about implementations allow a person skilledin the art to clearly understand that, for the purpose of convenient andbrief description, division into only the foregoing function modules isused as an example for description. In an actual application, theforegoing functions can be allocated to different function modules forimplementation based on a requirement. In other words, an innerstructure of an apparatus is divided into different function modules toimplement all or some of the functions described above. For a detailedworking process of the foregoing system, apparatus, and unit, refer to acorresponding process in the foregoing method embodiments, and detailsare not described herein again.

Function units in the embodiments of this application may be integratedinto one processing unit, or each of the units may exist alonephysically, or two or more units may be integrated into one unit. Theintegrated unit nay be implemented in a form of hardware, or may beimplemented in a form of a software functional unit.

When the integrated unit is implemented in the form of a softwarefunction unit and sold or used as an independent product, the integratedunit may be stored in a computer-readable storage medium. Based on suchan understanding, the technical solutions of the embodiments of thisapplication essentially, or the part contributing to the prior art, orall or some of the technical solutions may be implemented in a form of asoftware product. The computer software product is stored in a storagemedium and includes several instructions for instructing a computerdevice (which may be a personal computer, a server, or a network device)or a processor to perform all or some of the steps of the methodsdescribed in the embodiments of this application. The foregoing storagemedium includes: any medium that can store program code, such as a flashmemory, a removable hard disk, a read-only memory, a random accessmemory, a magnetic disk, or a compact disc.

The foregoing descriptions are merely specific implementations of theembodiments of this application, but are not intended to limit theprotection scope of the embodiments of this application. Any variationor replacement within the technical scope disclosed in the embodimentsof this application shall fall within the protection scope of theembodiments of this application. Therefore, the protection scope of theembodiments of this application shall be subject to the protection scopeof the claims.

1. A recommendation method based on an exercise status of a user andimplemented by an electronic device, the recommendation methodcomprising: obtaining first exercise data of the user after running anexercise application, wherein the first exercise data reflects a type ofexercise performed by the user; obtaining current first environment datathat reflects an environment feature during the exercise; determining afirst exercise scenario corresponding to the first exercise data and thefirst environment data; determining first recommended contentcorresponding to the first exercise scenario based on a historical usehabit of the user in the first exercise scenario; obtaining, from athird-party application, the first recommended content; and eitherdisplaying the first recommended content in a display interface of theexercise application or playing the first recommended content whenrunning the exercise application.
 2. The recommendation method of claim1, further comprising: determining, based on the first exercise data,the type of the exercise; and determining the type of the exercise asthe first exercise scenario.
 3. (canceled)
 4. The recommendation methodof claim 1, further comprising: storing a correspondence betweendifferent exercise scenarios and different recommended content; andquerying the correspondence for the first recommended contentcorresponding to the first exercise scenario.
 5. (canceled)
 6. Therecommendation method of claim 1, further comprising: displayingdetailed information of the first recommended content in the displayinterface; or displaying a shortcut of the first recommended content inthe display interface.
 7. The recommendation method of claim 6, whereinafter displaying the shortcut, the recommendation method furthercomprises: detecting that the user selects the shortcut; and responsiveto detecting that the user selects the shortcut, either displaying thedetailed information in the display interface or playing the detailedinformation.
 8. The recommendation method of claim 1, furthercomprising: receiving, while running the exercise application, a presetgesture from the user; and starting to play the first recommendedcontent responsive to receiving the preset gesture.
 9. Therecommendation method of claim 1, wherein before displaying the firstrecommended content in the display interface or before playing the firstrecommended content when running the exercise application, therecommendation method further comprises determining, based on the firstexercise scenario, whether to display the first recommended content inthe display interface or to play the first recommended content whenrunning the exercise application.
 10. The recommendation method of claim1, further comprising: obtaining second exercise data of the user whenrunning the exercise application; determining a second exercise scenariocorresponding to the second exercise data, wherein the second exercisescenario is different than the first exercise scenario; obtaining secondrecommended content corresponding to the second exercise scenario,wherein the second recommended content is different than the firstrecommended content; and displaying the second recommended content inthe display interface or playing the second recommended content whenrunning the exercise application.
 11. The recommendation method of claim1, wherein the first recommended content comprises one or more of anaudio file, a video file, fitness and health information, or environmentinformation.
 12. An electronic device, comprising: a display; one ormore sensors; a memory; and one or more processors coupled to thedisplay, the one or more sensors, and the memory, and configured tocause the electronic device to: obtain, using the one or more sensors,first exercise data of a user after running an exercise application,wherein the first exercise data reflects a type of exercise performed bythe user; obtain, using the one or more sensors, current firstenvironment data that reflects an environment feature during theexercise; determine a first exercise scenario corresponding to the firstexercise data and the first environment data; determine firstrecommended content corresponding to the first exercise scenario basedon a historical use habit of the user in the first exercise scenario;obtain, from a third-party application, the first recommended content;and either display, using the display, the first recommended content ina display interface of the exercise application or play the firstrecommended content when running the exercise application.
 13. Theelectronic device of claim 12, wherein the one or more processors arefurther configured cause the electronic device to: determine the type ofthe exercise based on the first exercise data; and determine the type ofthe exercise as the first exercise scenario.
 14. (canceled)
 15. Theelectronic device of claim 12, wherein the memory is configured to storea correspondence between different exercise scenarios and differentrecommended content, and wherein the one or more processors are furtherconfigured to cause the electronic device to query the correspondencefor the first recommended content corresponding to the first exercisescenario.
 16. The electronic device of claim 12, wherein the one or moreprocessors are further configured to cause the electronic device to:display, using the display, detailed information of the firstrecommended content in the display interface of the exerciseapplication; or display, using the display, a shortcut of the firstrecommended content in the display interface of the exerciseapplication.
 17. The electronic device of claim 16, wherein theelectronic device further comprises a touchscreen that comprises thedisplay, and wherein after the electronic device displays the shortcut,the one or more processors are further configured to cause theelectronic device to: if detect, using the touchscreen, that the userselects the shortcut; and responsive to detecting that the user selectsthe shortcut, either display, using the display, the detailedinformation in the display interface or play the detailed information.18. The electronic device of claim 12, wherein the electronic devicefurther comprises a touchscreen that comprises the display, and whereinthe one or more processors are further configured to cause theelectronic device to: receive, while running the exercise applicationand via the touchscreen, a preset gesture from the user; and start toplay the first recommended content responsive to receiving the presetgesture.
 19. The electronic device of claim 12, wherein before theelectronic device displays the first recommended content in the displayinterface of the exercise application, or before the electronic deviceplays the first recommended content when running the exerciseapplication, the one or more processors are further configured to causethe electronic device to determine, based on the first exercisescenario, whether to display the first recommended content in thedisplay interface or to play the first recommended content when runningthe exercise application.
 20. The electronic device of claim 12, whereinthe one or more processors are further configured to cause theelectronic device to: obtain second exercise data of the user whenrunning the exercise application; determine a second exercise scenariocorresponding to the second exercise data, wherein the second exercisescenario is different than the first exercise scenario; obtain secondrecommended content corresponding to the second exercise scenario,wherein the second recommended content is different than the firstrecommended content; and either display, using the display, the secondrecommended content in the display interface or play the secondrecommended content when running the exercise application.
 21. Anelectronic device, comprising: a touchscreen; a memory configured tostore one or more computer programs; and a processor coupled to thetouchscreen and the memory and configured to execute the one or morecomputer programs to cause the electronic device to: display a firstgraphical user interface (GUI) on the touchscreen when the electronicdevice is in a first exercise scenario, wherein the first GUI is a firstdisplay interface of an exercise application, and wherein the firstdisplay interface comprises first recommended content corresponding tothe first exercise scenario; and display a second GUI on the touchscreenwhen the electronic device is in a second exercise scenario that isdifferent than the first exercise scenario, wherein the second GUI is asecond display interface of the exercise application, and wherein thesecond display interface comprises second recommended content thatcorresponds to the second exercise scenario and that is different thanthe first recommended content.
 22. The electronic device of claim 21,wherein the processor is further configured to execute the one or morecomputer programs to cause the electronic device to: determine the firstrecommended content based on a historical use habit of a user in thefirst exercise scenario; and determine the second recommended contentbased on a historical use habit of the user in the second exercisescenario. 23.-24. (canceled)
 25. The electronic device of claim 12,wherein the first recommended content comprises one or more of an audiofile, a video file, fitness and health information, or environmentinformation.